﻿package com.ease.platform.model.type
{
	import com.ease.common.enums.OptionalEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.ease.platform.model.type.PermissionDimensionSourceType;

	[Bindable]
	[RemoteClass(alias="com.ease.platform.model.type.PermissionDimensionSourceType")]

	public class PermissionDimensionSourceType extends Enum
	{
		/* static init */
		{ initEnum(PermissionDimensionSourceType); }

		/* Constants */
		public static const User:PermissionDimensionSourceType = new PermissionDimensionSourceType("User", 1, "自用户");
		public static const UserLocation:PermissionDimensionSourceType = new PermissionDimensionSourceType("UserLocation", 2, "自用户所属区域");
		public static const UserGroup:PermissionDimensionSourceType = new PermissionDimensionSourceType("UserGroup", 3, "自用户所属用户组");
		public static const UserGroupLocation:PermissionDimensionSourceType = new PermissionDimensionSourceType("UserGroupLocation", 4, "自用户所属用户组所属区域");
		public static const UserOrgnization:PermissionDimensionSourceType = new PermissionDimensionSourceType("UserOrgnization", 5, "自用户所属组织机构");
		public static const UserOrgnizationLocation:PermissionDimensionSourceType = new PermissionDimensionSourceType("UserOrgnizationLocation", 6, "自用户所属组织机构所属区域");

		private var _value:int;
		private var _text:String;

		/*public*/ function PermissionDimensionSourceType(name:String=null ,value:int=0 ,text:String=null) {
			super.name = name;
			this._value = value;
			this._text = text;
		}

		public function get value():int  { return this._value; }
		public function get text():String  { return this._text; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(PermissionDimensionSourceType);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):PermissionDimensionSourceType {
			return PermissionDimensionSourceType(Enum.get(PermissionDimensionSourceType, constantName, caseSensitive));
		}
	}
}